package com.javasoft.service.YZX.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.javasoft.dao.YZX.PaperInquiryDao;
import com.javasoft.entity.WJC.StudentAnswer;
import com.javasoft.service.YZX._interface.PaperInquiryService;
import org.springframework.stereotype.Service;

@Service("paperInquiryService")
public class PaperInquiryServiceImpl extends ServiceImpl<PaperInquiryDao, StudentAnswer> implements PaperInquiryService {

    @Override
    public StudentAnswer findByStudentIdAndExamId(long studentId, long examId) {
        LambdaQueryWrapper<StudentAnswer> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(StudentAnswer::getStudentId, studentId)
                .eq(StudentAnswer::getExamId, examId);
        return baseMapper.selectOne(queryWrapper);
    }
}